/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package appGUI;

import java.awt.Color;
import java.awt.Font;
import java.awt.FontFormatException;
import java.awt.Graphics;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import javax.swing.JPanel;

/**
 *
 * @author Picto
 */
public class LetterGrid extends JPanel{
    URL fontLocation = this.getClass().getResource("/appGUI/resources/DS-DIGI.TTF");
    Font font;
    public LetterGrid(){
        setBackground(Color.BLACK);
        try {
            font = Font.createFont(Font.TRUETYPE_FONT, new File(fontLocation.getPath()));
        } catch (IOException | FontFormatException e) {
            //Handle exception
        }
    }
    
    @Override
    public void paintComponent(Graphics g) {
        super.paintComponent(g);
        g.setColor(Color.GREEN);
        g.setFont(font.deriveFont(50f));
        g.drawString("A", 6, 37);
        g.drawString("B", 42, 37);
        g.drawString("C", 78, 37);
        g.drawString("D", 114, 37);
        g.drawString("E", 150, 37);
        g.drawString("F", 186, 37);
        g.drawString("G", 222, 37);
        g.drawString("H", 6, 77);
        g.drawString("I", 42, 77);
        g.drawString("J", 78, 77);
        g.drawString("K", 114, 77);
        g.drawString("L", 150, 77);
        g.drawString("M", 186, 77);
        g.drawString("N", 222, 77);
        g.drawString("O", 6, 117);
        g.drawString("P", 42, 117);
        g.drawString("Q", 78, 117);
        g.drawString("R", 114, 117);
        g.drawString("S", 150, 117);
        g.drawString("T", 186, 117);
        g.drawString("U", 222, 117);
        g.drawString("V", 6, 157);
        g.drawString("W", 42, 157);
        g.drawString("X", 78, 157);
        g.drawString("Y", 114, 157);
        g.drawString("Z", 150, 157);
        g.drawRect(0, 0, 179, 160);
        g.drawRect(179, 0, 71, 120);
        //Vertical lines
        g.drawLine(35, 0, 35, 160);
        g.drawLine(71, 0, 71, 160);
        g.drawLine(107, 0, 107, 160);
        g.drawLine(143, 0, 143, 160);
        g.drawLine(215, 0, 215, 120);
        //Horizontal line
        g.drawLine(0, 40, 250, 40);
        g.drawLine(0, 80, 250, 80);
        g.drawLine(0, 120, 179, 120);
    }
}



